<template>
    <div>
        <h2>选择登录方式</h2>
        <router-link to="/loginView/sendVerificationCode/">
            <input class="btn" type="submit" value="监护人帮我登录" @click="select('loginByGuardianEmail')">
            <input class="btn" type="submit" value="我自己来登录/注册" @click="select('loginBySelfEmail')">
        </router-link>
    </div>
</template>

<script>


export default {
    name: "SelectLoginType",

    methods: {
        select(type) {
            // 向公共空间store的子模块loginModule的state中的selectLoginType赋值
            this.$store.commit("loginModule/changeSelectLoginType", type)
        }
    }
}
</script>

<style lang="less" scoped>
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.btn {
    display: block;
    width: 100%;
    height: 50px;
    border-radius: 25px;
    margin: 1rem 0;
    font-size: 1.2rem;
    outline: none;
    border: none;
    background-image: linear-gradient(to right, #32be8f, #38d39f, #32be8f);
    cursor: pointer;
    color: #fff;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    background-size: 200%;
    transition: .5s;
}

.btn:hover {
    background-position: right;
}

h2 {
    font-size: 2.9rem;
    text-transform: uppercase;
    margin: 8px 0 15px;
    color: #037971;
}

@media screen and (max-width: 1000px) {
    h2 {
        font-size: 2.4rem;
        margin: 8px 0 15px;
    }
}
</style>
